//! 密钥
//!

#[derive(Debug, Clone)]
pub struct Keys {
    public_key: String,  // 钱包公钥
    private_key: String, // 钱包私钥
}

impl Keys {
    pub fn new(public_key: &str, private_key: &str) -> Self {
        Self {
            public_key: public_key.to_string(),
            private_key: private_key.to_string(),
        }
    }

    pub fn set_private_key(&mut self, private_key: &str) {
        self.private_key = private_key.to_string();
    }

    pub fn set_public_key(&mut self, public_key: &str) {
        self.public_key = public_key.to_string();
    }

    pub fn private(&self) -> &str {
        &self.private_key
    }

    pub fn public(&self) -> &str {
        &self.public_key
    }
}
